package com.hanbang.baseproject.view.home.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.hanbang.baseproject.R;
import com.hanbang.baseproject.code.base.presenter.BasePresenter;
import com.hanbang.baseproject.code.base.view.activity.BaseMainActivity;
import com.hanbang.baseproject.utils.bitmap.GlideUtils;

import butterknife.BindView;
import butterknife.OnClick;


/**
 * Created by yang on 2017/5/3 7:18
 */
public class MyActivity extends BaseMainActivity {
    public static String PICTUE;
    public static String NAME = "姓名";
    public static String NUM = "000";
    @BindView(R.id.picture)
    ImageView picture;
    @BindView(R.id.name)
    TextView name;
    @BindView(R.id.number)
    TextView number;

    public static void startUI(Activity activity) {
        Intent intent = new Intent(activity, MyActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
        activity.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public BasePresenter initPressenter() {
        return null;
    }

    @Override
    public int getContentView() {
        return R.layout.activity_my;
    }


    @Override
    public void initView() {
        super.initView();
        toolbar.setTitle("微信(189)");
        toolbar.addAction(1,"13",R.drawable.ic_search_black_24dp);
        toolbar.addAction(1,"13",R.drawable.ic_add_black_24dp);


    }

    @Override
    public void parseIntent(Intent intent) {

    }

    @Override
    protected void onResume() {
        super.onResume();
        GlideUtils.show(picture, PICTUE);
        name.setText(NAME);
        number.setText("微信号:" + NUM);
    }

    @Override
    public int currentItem() {
        return 3;
    }

    @OnClick(R.id.set)
    public void onViewClicked() {
        SetActivity.startUI(this);
    }
}
